package com.bitoon.basketdudes.jpa;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Entity
@Table(name = "ranking_fecha", schema = "rankings")

public class RankingFecha implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id")
    private int id;

    @Basic(optional = true)
    @Column(name = "f_ini")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fIni;

    @Column(name = "f_fin")
    @Basic(optional = true)
    @Temporal(TemporalType.TIMESTAMP)
    private Date fFin;

    public RankingFecha() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Date getFIni() {
        return fIni;
    }

    public void setFIni(Date id) {
        this.fIni = id;
    }

    public Date getFFin() {
        return fFin;
    }

    public void setFFin(Date fecha) {
        this.fFin = fecha;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (fFin != null ? fFin.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RankingFecha)) {
            return false;
        }
        RankingFecha other = (RankingFecha) object;
        if ((this.fIni == null && other.fIni != null) ||
            (this.fFin != null && !this.fFin.equals(other.fFin))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bitoon.basketdudes.jpa.RankingFecha[id="+ fIni + "" + fFin + "]";
    }

}
